﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace FrequentlyAskedQuestionsSolution
{

    /// <summary>
    /// Put in the masterfile in the head: <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>
    /// </summary>
    public class BaseCssLoader : Control
    {
        public string CssUrl { get; set; }

        protected override void CreateChildControls()
        {
            Literal cssloader = new Literal();
            Controls.Add(cssloader);
            cssloader.Text = string.Format("<link rel=\"stylesheet\" type=\"text/css\" href=\"{0}\"/>", CssUrl);
            base.CreateChildControls();

        }
    }
}
